<?php


namespace app\common\model;


use think\Model;

class Sign extends Model
{
    # 关联模型
    public function registered()
    {
        return $this->hasMany('app\\common\\model\\Registered', 'sign', 'sign');
    }
    # 根据用户id获取对应标识的所有注册记录
    public function everySignData($user_id)
    {
        return self::with('registered')
            ->where('user_id', '=', $user_id)
            ->select()
            ->toArray();
    }
}